// config/index.js
// 全局配置文件

module.exports = {
  // API配置
  api: {
    baseUrl: 'https://api.mingshu.com',
    timeout: 10000
  },
  
  // 应用配置
  app: {
    name: '明塾',
    version: '1.0.0',
    env: 'development' // development | production
  },
  
  // 分页配置
  pagination: {
    pageSize: 10,
    maxPageSize: 50
  },
  
  // 上传配置
  upload: {
    maxSize: 10 * 1024 * 1024, // 10MB
    allowedTypes: ['image/jpeg', 'image/png', 'image/gif'],
    imageMaxSize: 5 * 1024 * 1024 // 5MB
  },
  
  // 缓存配置
  cache: {
    userInfoKey: 'userInfo',
    tokenKey: 'token',
    expireTime: 7 * 24 * 60 * 60 * 1000 // 7天
  },
  
  // 用户类型
  userType: {
    STUDENT: 'student',
    TEACHER: 'teacher'
  },
  
  // 课程状态
  courseStatus: {
    NOT_STARTED: 0,
    IN_PROGRESS: 1,
    COMPLETED: 2,
    CANCELLED: 3
  },
  
  // 直播状态
  liveStatus: {
    NOT_STARTED: 0,
    LIVE: 1,
    ENDED: 2
  },
  
  // 订单状态
  orderStatus: {
    PENDING: 0,
    PAID: 1,
    CANCELLED: 2,
    REFUNDED: 3
  }
}
